package com.aaa.javaweb.dao.impl;

import com.aaa.javaweb.dao.MeuaDao;
import com.aaa.javaweb.until.JDBCUntil;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class MeuaDaoImpl implements MeuaDao {
    @Override
    public List<Map> querymeua() {
        String sql="select * from t_menu where mpid=0";
        return JDBCUntil.selectMap(sql);
    }

    @Override
    public List<Map> queryid(Object id) {
        String sql="select * from t_menu where mpid=?";
        return JDBCUntil.selectMap(sql,id);
    }

    @Override
    public List<Map> querymeuaid(String jueseid) {
        String sql="select * from t_menu where id in (select cdid from t_rolemenu where jsid=? ) AND mpid=0";
        return JDBCUntil.selectMap(sql,jueseid);
    }
}
